import java.util.Scanner;
public class 判断用户是否中奖 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入4为会员卡号：");
        int i = sc.nextInt();
        int ge = i/1%10;
        int shi = i/10%10;
        int bai = i/10/10%10;
        int qian = i/10/10/10%10;
        int sum = ge + shi +bai +qian;
        System.out.print("千位数" + qian + ",");
        System.out.print("百位数" + bai + ",");
        System.out.print("十位数" + shi + ",");
        System.out.println("个位数" + ge);
        System.out.println("会员卡号"+ qian + bai + shi + ge +"之和： "+ sum);
        if( sum > 20 ){
            System.out.println("" + qian + bai + shi + ge +"是幸运用户，获精美MP3一个！");
        }
    }
}